home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / gcc / libnix.lha / gnu / lib / libnix / sources.lha / detach / makefile < prev    next >
Encoding:
Makefile  |  1999-07-20  |  1.2 KB  |  48 lines

  1. OBJECTS=__initdetach.o
  2. BOBJECTS=__initdetach.bo
  3. OPTIONS=-I ../headers -O3 -Wall
  4. BOPTIONS=$(OPTIONS) -fbaserel -msmall-code
  5. REDEF=-D _DOSBase=___DOSBase \
  6.       -D _UtilityBase=___UtilityBase \
  7.       -D _MathIeeeSingBasBase=___MathIeeeSingBasBase \
  8.       -D _MathIeeeSingTransBase=___MathIeeeSingTransBase \
  9.       -D _MathIeeeDoubBasBase=___MathIeeeDoubBasBase \
  10.       -D _MathIeeeDoubTransBase=___MathIeeeDoubTransBase \
  11.       -D _LocaleBase=___LocaleBase
  12.  
  13. #Use private library bases to avoid naming collisions
  14. %.o: %.c
  15.     gcc $(OPTIONS) -S $*.c -o $*.S 2>&1|tee $*.err
  16.     gcc -E -traditional -P $(REDEF) $*.S -o $*2.S
  17.     gcc $*2.S -c -o $*.o
  18.     -rm $*.S $*2.S
  19.     -if test ! -s $*.err; then rm $*.err; fi
  20.  
  21. %.bo: %.c
  22.     gcc $(BOPTIONS) -S $*.c -o $*.S 2>&1|tee $*.err
  23.     gcc -E -traditional -P $(REDEF) $*.S -o $*2.S
  24.     gcc $*2.S -c -o $*.bo
  25.     -rm $*.S $*2.S
  26.     -if test ! -s $*.err; then rm $*.err; fi
  27.  
  28. all: libdetach.a blibdetach.a
  29.  
  30. clean:
  31.     -rm *.o *.bo *.err
  32.  
  33. veryclean: clean
  34.     -rm libdetach.a blibdetach.a makefile
  35.  
  36. libdetach.a: $(OBJECTS) makefile
  37.     -rm libdetach.a
  38.     ar -q libdetach.a $(OBJECTS)
  39.     ranlib libdetach.a
  40.  
  41. blibdetach.a: $(BOBJECTS) makefile
  42.     -rm blibdetach.a
  43.     ar -q blibdetach.a $(BOBJECTS)
  44.     ranlib blibdetach.a
  45.  
  46. .SUFFIXES:
  47. .SUFFIXES: .o .bo
  48.